<template>
  <div v-loading="loading">
    <p class="SingerName">
      {{ $route.query.name }}
      <span class="englishName">{{ singerObj && singerObj.alias[0] }}</span>
    </p>
    <div class="singerImgBox">
      <img :src="singerObj && singerObj.picUrl" alt="" />
      <div class="shadowBox"></div>
      <div class="homepage"></div>
      <div class="collection"></div>
    </div>
  </div>
</template>

<script>
import { getAlbum } from "@/api";
export default {
  data() {
    return {
      loading: false,
      singerObj: undefined,
    };
  },
  created() {
    this.getData();
  },
  methods: {
    getData() {
      this.loading = true;
      getAlbum({ id: this.$route.query.id }).then((res) => {
        this.loading = false;
        this.singerObj = res.artist;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.SingerName {
  height: 34px;
  line-height: 24px;
  font-weight: normal;
  font-size: 24px;
  color: #333;
  .englishName {
    max-width: 23%;
    padding-left: 10px;
    font-size: 14px;
    line-height: 32px;
    color: #999;
    font-weight: normal;
  }
}
.singerImgBox {
  width: 640px;
  position: relative;
  height: 300px;
  box-sizing: border-box;
  overflow: hidden;
  .shadowBox {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    background: url("./../../assets/imges/shadou.png") no-repeat 0 0;
    top: 0;
  }
  img {
    width: 100%;
    margin-top: -100px;
  }
  .homepage {
    display: block;
    position: absolute;
    bottom: 18px;
    right: 20px;
    width: 76px;
    height: 32px;
    background: url("./../../assets/imges/btnIcon.png") no-repeat 0 -500px;
  }
  .collection {
    display: block;
    position: absolute;
    bottom: 18px;
    right: 116px;
    width: 96px;
    height: 32px;
    background: url("./../../assets/imges/btnIcon.png") no-repeat 0 -1156px;
  }
}
</style>